Whoops, while
ff4623454 fixed the handling of `undefined` objects,
`null` objects obviously still don't have a toString() method. So also
handle those and return 'null' in case the object is null.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1024
// special case this since the default is way, way too verbose
return '<js function>';
} else {
- return o !== undefined ? o.toString() : 'undefined';
+ if (o === undefined)
+ return 'undefined';
+
+ if (o === null)
+ return 'null';
+
+ return o.toString();
}
}